package com.zh.demo;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.Date;

@SpringBootApplication
@EnableAutoConfiguration
@MapperScan("com.zh.demo.mapper")
//@EnableDiscoveryClient
public class DemoApplication {


	public static void main(String[] args) {

		System.out.println(new Date()+"  ===> application demo start ...");

		ConfigurableApplicationContext context = SpringApplication.run(DemoApplication.class, args);

		String server_port = context.getEnvironment().getProperty("server.port");
		String server_host = context.getEnvironment().getProperty("server.host");

		System.out.println(new Date()+"  ===> application demo server host:port: "+server_host+":"+server_port);

		System.out.println(new Date()+"  ===> application demo start success");
	}


}

